#include <hge.h>
#include <hgeresource.h>
#include <hgefont.h>

#include "FAobject.h"

HGE *hge = 0;
hgeFont *font;
HSTREAM Music;
HCHANNEL chan[2];
hgeResourceManager *Resource;

bool FrameFunc()
{
	return false;
}

int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
	hge = hgeCreate(HGE_VERSION);

	hge->System_SetState(HGE_FRAMEFUNC, FrameFunc);

	hge->System_SetState(HGE_WINDOWED, true);
	hge->System_SetState(HGE_TITLE, "FriedAss");

	if (hge->System_Initiate())
	{
		Resource = new hgeResourceManager("resource.res");
		
		Music = hge->Stream_Load("music.mp3", 0);
		chan[0] = hge->Stream_Play(Music, true, 100);
				
		hge->System_Start();
	}
	else
	{
		MessageBox(NULL, hge->System_GetErrorMessage(), "Error", MB_OK | MB_ICONERROR | MB_APPLMODAL);
	}
}